Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Internet and Regional Text Encoding Names /


TECGetWebTextEncodings

Returns the currently supported text encoding specifications for a specified region.

pascal OSStatus TECGetWebTextEncodings (
                     RegionCode locale, 
                     TextEncoding availableEncodings[], 
                     ItemCount maxAvailableEncodings, 
                     ItemCount *actualAvailableEncodings);
locale
A Mac OS region code indicating the locale for which you want to obtain encodings. A region code designates a combination of language, writing system, and geographic region; the region may not correspond to a particular country (for example, Swiss French or Arabic).
availableEncodings[]
An array of text encoding specifications. On return, the array contains specifications for the currently supported text encodings in the specified region. To determine how large an array to allocate, use the function TECGetWebTextEncodings (page 79).
maxAvailableEncodings
The number of text encoding specifications the availableEncodings array can contain.
actualAvailableEncodings
A pointer to a value of type ItemCount. On output, this value indicates the number of text encodings the function returned in the availableEncodings array.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.
DISCUSSION
For a specified Mac OS region code, TECGetWebTextEncodings fills in an array of type TextEncoding with a list of encodings commonly found on the World Wide Web for that region. The function eliminates any duplicate information in the process, so the number of encodings TECGetWebTextEncodings returns in the availableEncodings array may be fewer than the number of elements you allocated for the array based on your call to TECCountWebTextEncodings (page 77). TECGetWebTextEncodings tells you the number of specifications it returns in the actualAvailableEncodings parameter.

The list of available encodings could be used for an encoding selection menu found in many Web browsers.

SEE ALSO
The function TECCountAvailableTextEncodings (page 66)

The function TECGetAvailableTextEncodings (page 67)

The function TECGetTextEncodingFromInternetName (page 76)

The function GetTextEncodingName (page 52)

The region codes section of "Script Manager" in Inside Macintosh: Text


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997